package com.zhuanzhuan.hero.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhuanzhuan.hero.user.entity.HeroUserLabelRelation;
import com.zhuanzhuan.hero.user.pojo.bo.QueryUserLabelRelateBO;
import com.zhuanzhuan.hero.user.pojo.po.LabelInfoPO;
import com.zhuanzhuan.hero.user.pojo.po.QueryBusinessLabelRelatePO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * dal Interface:HeroUserLabelRelation
 * @author hanjunjun
 * @date 2024-6-21
 */
public interface HeroUserLabelRelationMapper extends BaseMapper<HeroUserLabelRelation> {

    List<HeroUserLabelRelation> select(HeroUserLabelRelation record);

    Integer getCount(HeroUserLabelRelation record);

    /**
     * 复杂连表查询
     *
     * @param queryUserLabelRelateBO
     * @return java.util.List<com.zhuanzhuan.hero.user.vo.backend.QueryBusinessLabelRelateVO>
     * @author  hanjunjun
     * @date 2024/7/1
     **/
    List<QueryBusinessLabelRelatePO> queryParam(QueryUserLabelRelateBO queryUserLabelRelateBO);

    /**
     * 从用户标签关联表 连表查询标签主表信息
     *
     * @param uids
     * @param labelType
     * @return java.util.List<com.zhuanzhuan.hero.user.pojo.po.LabelInfoPO>
     * @author  hanjunjun
     * @date 2024/7/3
     **/
    List<LabelInfoPO> queryUserRealateLabelInfos(@Param("uids") List<Long> uids, @Param("labelType") Integer labelType);

    /**
     * 标签被认证数++
     *
     * @param uid
     * @param labelIds
     * @return void
     * @author  hanjunjun
     * @date 2024/7/3
     **/
    void increCertifiedNum(@Param("uid") Long uid, @Param("labelIds") List<Long> labelIds);

    /**
     * 标签被认证数--
     *
     * @param uid
     * @param labelIds
     * @return void
     * @author  hanjunjun
     * @date 2024/7/3
     **/
    void decreCertifiedNum(@Param("uid") Long uid, @Param("labelIds") List<Long> labelIds);
}